#!/usr/bin/perl -w   

#use strict;

use DBI;
use Time::localtime ;
use Time::Local ;
use CGI qw(:standard);
use MIME::Lite; 
use Mail::Sender;

use LWP;
use HTTP::Request::Common;

use Encode;#  ::compat;
use Encode qw(encode decode);






my ($res_db,@res_db,@res_db2,$dbh,$dbh2);
my ($fio,$birthyear,$country,$town,$mphone,$operator,$skype,$levelknowledge,$sth,$sth2,$id,$i,$val,$payment);
my ($email,$emailmissrings,$passw,$password2,$commtime,$studentid,$treningid,$vid,$ask_smirnov,$ask_smirnov_str);
my ($inrings,$outrings,$result,$wishing,$email2,$step,$nexttask,$balls,$path,$missrings);
my ($sendtasktime,$taskstatus,$datediff,$sendtasktime2,$sendtasktime3,$now,$curballs,$sendtasktime_w);
my ($msg,$contactgr,$contacters,$status,$passw3,$countcontactgroup,$currentcontactgroup,$vacation);
my ($chkg1,$chkg2,$chkg3,$cmnd,$cmnd_score,$msg2,$msg3,$SUBJECT,$SUBJECT2,$passw2,$email3,$value2,$value,$contactmembers,@contactmembers);
my ($addwork,$hometasks,$timespend,$timespend2,$timeofhometask,$gonext,$takeme,$situations,$pausedays,$statusring,$countcontactmembers);
my (@seldate,$find1,$find2,$find3,$find4,$contactmessage,$curcontactmessage,$j,$bgcolor,$addcontactgr);
my ($today1,$tomorrow1,$today2,$tomorrow2,$today3,$tomorrow3,$today4,$tomorrow4,$hards,$nowdate,$nopaynext_str2);
my ($shedule_today,$shedule_tomorrow,$idcolor,$timetoday,$timetomorrow,$stepcolor,@missrings,$dontstart,$association,$innovation,$pausestring);
my ($fin_steps,$fin_inrings,$fin_outrings,$fin_spendtime,$fin_achive,$fin_impressions,$fin_wish,$price,$f_letter_friend,$treninglevel,$association_str);

my ($datestart,$trmode,$talkstep,$talkmodestep,$countletters,$expertring,$dontpay,$nexttreningid,$restdays,$nopaynext_str);
my ($letter,$letterid,$noreplystudentid,$letterreply,$sendbutton,$lettermade,$letter_db,$cnt_expert_rings,$forsage,$max_step,$next_step,$max_step_str);
my ($showlast,$inp2,$rest_steps,$f_fin_report,$free_recover,$inp3,$f_communication,$lettersubject,$p_letterid,$ringsreport,$letterstep);
my ($letter_friend,@letter_friend,$yatestr,$puzzle_button,$puzzleid,$lessonid,$complete_puzzle,$oneday_deadline,$bonus,$advance_str);
my ($file,$sendmsg,$sendemail,$sender,$nomphone,$cmnd2,$vid2,$contacts,$time1,$time2,$time3,$time4,@fio);
my ($message,$called,$command_date,@list_command,$list_command,$temp,$make_cmnd,$list_exclude,$group,$text_s,$bonus_cmnd_bas,$bonus_cmnd_beg);
my ($bonus_end,$fine,$cnt_base_lessons,$cnt_begin_lessons,$month1,$lessons,$old_lessons,$packet,$bonus_beg);


print "Content-Type: text/html; charset=UTF-8\n\n";


  print start_form();


$id = param("id");
$number = param("number");
$email=param("email");
$passwd=param("passwd");
$level=param("level");


$url5="http://www.ss77.ru/forum/add.php?id=${studentid}\&number=12\&passwd=${passw}\&level=${level}\&email=${email}";
#$url5=encode("UTF-8",decode("cp1251",$url5));

$ua =LWP::UserAgent->new;
$request =HTTP::Request->new(GET=> $url5);
$response =$ua->request($request);
$content= $response->content();
open (RES,">qoute_y.html");
print p("$content");





  print end_html;
